package com.wfs.capsulation;

public class Student {
    // 默认private
    String name;
    Double math;
    Double chinese;


    public Student(String name, Double math, Double chinese) {
        this.name = name;
        this.math = math;
        this.chinese = chinese;
    }

    public void printAllScore() {
        System.out.println(name + " " + math + " " + chinese);
    }
    public Double getAverage() {
        return (math + chinese) / 2;
    }
}
